function setimg(hf,varargin)

switch nargin-1
    case 0 
        xlim = [];
        ylim = [];
        zlim = [];
    case 1
        xlim = varargin{1};
        ylim = [];
        zlim = [];
    case 2
        xlim = varargin{1};
        ylim = varargin{2};
        zlim = [];
    case 3
        xlim = varargin{1};
        ylim = varargin{2};
        zlim = varargin{3};
    otherwise
        error('Too many input arguments!')
end

fontsize = 17;
legendfontsize = fontsize-3;
fontname = 'FixedWidth';
% 设置fig属性
hf.Units = 'centimeters';
hf.Position = [12 5 16 12];

% colorLib = {'#0072BD','#D95319','#EDB120','#7E2F8E','#77AC30','#4DBEEE','#A2142F'};
colorLib = [0              0.4470    0.7410;
                    0.8500    0.3250    0.0980;
                    0.9290    0.6940    0.1250;
                    0.4940    0.1840    0.5560;
                    0.4660    0.6740    0.1880;
                    0.3010    0.7450    0.9330;
                    0.6350    0.0780    0.1840];
linestyleLib = {'-','-','--',':','-.'};
markerLib = {'none','o','s','d','^','v','>','<','p','h','+','*','x'};

% numColor = length(colorLib);
% numSty = length(linestyleLib);
% numMarker = length(markerLib);

cld = hf.Children;
numChildren = length(cld);

for i = 1:numChildren
    switch cld(i).Type
        case 'legend'
            hl = cld(i);
            hl.FontSize = legendfontsize;
            hl.FontWeight = 'bold';
        case 'ColorBar'
            hc = cld(i);
        case 'axes'
            ha = cld(i);
            % Multiple plots
            ha.ColorOrder = colorLib;
            ha.LineStyleOrder = linestyleLib;
            grid(ha,'on');
            % 坐标轴区域属性设置
            ha.Box = 'on';
            ha.FontSize = fontsize;   %刻度字体大小
            ha.FontName= fontname;
            ha.FontWeight = 'bold';
            ha.LineWidth = 2; %边框线宽
            ha.PositionConstraint = 'outerposition';
            
            if ~isempty(xlim)
                ha.XLim = xlim;
                ha.XTick = linspace(xlim(1),xlim(2),5);
            end
            
            if ~isempty(ylim)
                ha.YLim = ylim;
                ha.YTick = linspace(ylim(1),ylim(2),5);
            end
            
            if ~isempty(zlim)
                ha.ZLim = zlim;
                ha.ZTick = linspace(zlim(1),zlim(2),5);
            end
            
            % xlabel属性设置
            ha_xlabel = ha.XLabel;
            ha_xlabel.FontSize = fontsize;
            ha_xlabel.FontWeight = 'bold'; %normal,bold
            ha_xlabel.FontName= fontname;
            
            % ylabel属性设置
            ha_ylabel = ha.YLabel;
            ha_ylabel.FontSize = fontsize;
            ha_ylabel.FontWeight = 'bold';
            ha_ylabel.FontName= fontname;
            
            
            % zlabel属性设置
            ha_zlabel = ha.ZLabel;
            ha_zlabel.FontSize = fontsize;
            ha_zlabel.FontWeight = 'bold';
            ha_zlabel.FontName= fontname;
            
            % title属性设置
            ha_title = ha.Title;
            ha_title.FontSize = fontsize;
            ha_title.FontWeight = 'bold';
            ha_title.FontName= fontname;
                        
            %设置线形
            hline = ha.Children;
            
            for j = 1:length(hline)
                switch hline(j).Type
                    case 'line'
                        h_line = hline(j);
%                         h_line.Color = colorLib{mod(j,numColor)+1};
% 
%                         h_line.LineStyle = linestyleLib{mod(j,numSty)+1};
                        h_line.LineWidth = 2;
% 
%                         h_line.Marker = markerLib{mod(j-1,numMarker)+1};
%                         h_line.MarkerSize = 6;
%                         dataLen = length(h_line.XData);
%                         h_line.MarkerIndices = 1:round(dataLen/20):dataLen;
                    otherwise
                        % TODO
                end
            end
        otherwise
            
    end
end